from typing import Union

from pydantic import BaseModel


class Token(BaseModel):
    token: str


class TokenData(BaseModel):
    username: Union[str, None] = None;
    id: int


class WechatAuth(BaseModel):
    code: str



class ActiveCode(BaseModel):
    code: str


class VerificationRequest(BaseModel):
    phone: int
    is_login: Union[bool, None] = True


class SettingPassword(BaseModel):
    password: str
    verify_password: str

class UserLogin(BaseModel):
    phone: str
    password: str


class VerificationSubmit(BaseModel):
    phone: str
    code: str


class Login(BaseModel):
    username:str
    password:str


